-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modeling exercises
: Fix submission error and redundant tooltip for AI feedback
#9437
Modeling exercises
: Fix submission error and redundant tooltip for AI feedback
#9437
Conversation
…can continue working
https://github.com/ls1intum/Artemis into feature/text-exercises/immediate-preliminary-feedback
https://github.com/ls1intum/Artemis into feature/text-exercises/immediate-preliminary-feedback
Modeling
: Fix Server-Side Submission Error and Redundant Tooltip for AI Feedback in Modeling ExercisesModeling Exercises
: Fix Server-Side Submission Error and Redundant Tooltip for AI Feedback
Modeling Exercises
: Fix Server-Side Submission Error and Redundant Tooltip for AI FeedbackModeling Exercises
: Fix Server-Side Submission Error and Redundant Tooltip for AI Feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range comments (1)
src/main/java/de/tum/cit/aet/artemis/modeling/service/ModelingSubmissionService.java (1)
Line range hint
236-249
: LGTM! Consider a minor improvement in variable naming.The new method
setNumberOfAffectedSubmissionsPerElement
is well-implemented and aligns with the single responsibility principle. It effectively calculates and sets the number of similar elements for a given modeling submission.Consider renaming the
modelElementCount
variable in the stream operation to improve clarity:-elementCounts.stream().map(modelElementCount -> { +elementCounts.stream().map(elementCount -> { SimilarElementCount similarElementCount = new SimilarElementCount(); - similarElementCount.setElementId(modelElementCount.getElementId()); - similarElementCount.setNumberOfOtherElements(modelElementCount.getNumberOfOtherElements()); + similarElementCount.setElementId(elementCount.getElementId()); + similarElementCount.setNumberOfOtherElements(elementCount.getNumberOfOtherElements()); return similarElementCount; }).collect(Collectors.toSet()));This change makes it clearer that we're mapping from
ModelElementCount
toSimilarElementCount
.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
📒 Files selected for processing (1)
- src/main/java/de/tum/cit/aet/artemis/modeling/service/ModelingSubmissionService.java (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/java/de/tum/cit/aet/artemis/modeling/service/ModelingSubmissionService.java (1)
Pattern
src/main/java/**/*.java
: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports
src/main/java/de/tum/cit/aet/artemis/modeling/service/ModelingSubmissionService.java
Outdated
Show resolved
Hide resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range comments (1)
src/main/java/de/tum/cit/aet/artemis/modeling/service/ModelingSubmissionService.java (1)
Line range hint
228-240
: LGTM! Consider adding a brief comment for clarity.The new method
setNumberOfAffectedSubmissionsPerElement
is well-implemented and follows good coding practices. It effectively sets the number of potential automatic feedback for each model element.Consider adding a brief comment before the stream operation to explain the transformation:
// Transform ModelElementCount objects to SimilarElementCount objects submission.setSimilarElements(elementCounts.stream().map(modelElementCount -> { // ... (existing code) }).collect(Collectors.toSet()));This addition would enhance code readability and make the purpose of the stream operation more explicit.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
📒 Files selected for processing (1)
- src/main/java/de/tum/cit/aet/artemis/modeling/service/ModelingSubmissionService.java (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/java/de/tum/cit/aet/artemis/modeling/service/ModelingSubmissionService.java (1)
Pattern
src/main/java/**/*.java
: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports
src/main/java/de/tum/cit/aet/artemis/modeling/service/ModelingSubmissionService.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
also works as expected on ts1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on ts1. Code also lgtm.
Modeling Exercises
: Fix Server-Side Submission Error and Redundant Tooltip for AI FeedbackModeling exercises
: Fix server-side submission error and redundant tooltip for ai feedback
…edback-submission
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code
Modeling exercises
: Fix server-side submission error and redundant tooltip for ai feedbackModeling exercises
: Fix submission error and redundant tooltip for AI feedback
Checklist
General
Server
Client
authorities
to all new routes and checked the course groups for displaying navigation elements (links, buttons).Changes affecting Programming Exercises
Motivation and Context
Prerequisites:
The Problem:
Description
The submission issue occurs because the new AI feedback result is not correctly associated with the modelingSubmission object on the client-side. This causes the server to assume that no result is linked to the current submission, leading to errors. The PR ensures that the server-side checks for results associated with the modelingSubmission before proceeding, preventing errors.
The PR also prevents the tooltip indicating "New Assessment Available" from appearing unnecessarily for AI-generated preliminary feedback results, improving the user experience by removing the redundant notification.
Steps for Testing
Instructor Setup:
Student Participation:
Check:
Exam Mode Testing
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.
Review Progress
Performance Review
Code Review
Manual Tests
Exam Mode Test
Performance Tests
Test Coverage
Screenshots
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests
Style